#ifndef _ACCEPTOR_H
#define _ACCEPTOR_H
#include "Socket.hpp"
#include "InetAddress.hpp"


class Acceptor
{
public:
    Acceptor(uint16_t port,string ip):_addr(port,ip){}
    ~Acceptor() {}
    void ready();
    int accept();
    
    inline 
    int fd(){return _sock.fd();}

private:
    InetAddress _addr;
    Socket _sock;
};
#endif

